﻿using System;
using System.ComponentModel;


namespace BudgetPanoramaApplication.Model
{
    public class NavigationItem : INotifyPropertyChanged
    {
        #region Properties
        private string _title;
        /// <summary>
        /// This property is used in the view to display its value using a Binding.
        /// Only use for the Menu / Settings
        /// </summary>
        /// <returns></returns>
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("Title");
                }
            }
        }

        private string _summary;
        /// <summary>
        /// This property is used in the view to display its value using a Binding.
        /// Only use for the Menu / Settings
        /// </summary>
        public string Summary
        {
            get
            {
                return _summary;
            }
            set
            {
                if (value != _summary)
                {
                    _summary = value;
                    NotifyPropertyChanged("Summary");
                }
            }
        }
        #endregion 

        #region Implements of INotifyPropertyChanged
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
    }
}